import http from '@/services/http';

export function getFilterList() {
  return http.get<Requestor.Response<Requestor.FilterResponse[]>>(
    '/api/admin/MerchantAccount/filter/list',
  );
}
export function getList<T>(params: MerchantAccountUserManagementApi.ListParams) {
  return http.post<Requestor.ListResponse<T>>('/api/admin/MerchantAccount/list', {
    data: params,
  });
}
export function getInfo<T>(params: MerchantAccountUserManagementApi.InfoParams) {
  return http.get<Requestor.Response<T>>('/api/admin/MerchantAccount/info', {
    params,
  });
}
export function create(params: MerchantAccountUserManagementApi.CreateParams) {
  return http.post<Requestor.TeamplateResponse>('/api/admin/MerchantAccount/create', {
    data: params,
  });
}
export function update(params: MerchantAccountUserManagementApi.UpdateParams) {
  return http.post<Requestor.TeamplateResponse>('/api/admin/MerchantAccount/update', {
    data: params,
  });
}
export function updateBind(params: MerchantAccountUserManagementApi.BindParams) {
  return http.post<Requestor.TeamplateResponse>('/api/admin/MerchantAccount/update/shop', {
    data: params,
  });
}

export function remove(params: MerchantAccountUserManagementApi.DeleteParams) {
  return http.post<Requestor.TeamplateResponse>('/api/admin/MerchantAccount/delete', {
    data: params,
  });
}
